package com.demo.enums;

/**
 * 消息统计类型
 */
public enum QualityControlTypeEnum {
    MONTH_CONTROL(1, "月度"),
    QUARTER_CONTROL(2, "季度"),
    YEAR_CONTROL(3, "年度");

    private int value;
    private String desc;

    QualityControlTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static QualityControlTypeEnum getByValue(Integer value) {
        for (QualityControlTypeEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
